import i18n from '@/i18n'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { MetaResourceModuleAction } from './meta-resource-module-action'

export class MetaResourceModule {
  static ApiPropertyEnum = {}

  @ApiProperty({ description: 'ID', type: Number })
  id: number

  @ApiProperty({ description: i18n.t('app-meta.model.meta-resource-module.1215084-0'), type: String })
  name: string

  @ApiProperty({ description: i18n.t('app-meta.model.meta-resource-module.1215084-1'), type: String })
  label: string

  @ApiProperty({ description: i18n.t('app-meta.model.meta-resource-module.1215084-2'), type: String })
  platform: string

  @ApiPropertyOptional({ description: i18n.t('app-meta.model.meta-resource-module.1215084-3'), type: String })
  project?: string

  @ApiProperty({ description: i18n.t('app-meta.model.meta-resource-module.1215084-4'), type: Date })
  createTime: Date

  @ApiProperty({
    description: i18n.t('app-meta.model.meta-resource-module.1215084-5'),
    isArray: true,
    type: () => MetaResourceModuleAction,
  })
  resourceModuleActions?: MetaResourceModuleAction[]
}
